package sctu.edu.java.year2016.team07.shihaocheng.day20160530.chapter9_1;

/**
 * Created by admin on 2016/5/30.
 */
public class OutSum {
    InSum p = new InSum();
     int i = 1;
        class InSum{
            int c;
            void Sum(){
               int sum = (p.c+1)/2*p.c;
                System.out.println("1至"+p.c+"的和为:"+sum);
            }
        }
    InSum GetNum(int x){
        p.c = x;
        return new InSum();
    }
    void Fin(){
        p.Sum();
    }
}
